<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="/game-treasure/jquery-2.1.0.js"></script>
		<script src="//static1.finchain.cc/jquery.form.js"></script>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			a{
				text-decoration: none;
			}
			html,body{
				width: 100%;
				height: 100%;
			}
			#index{
				width: 100%;
				height: 100%;
				background: url(/game-treasure/img/bg.png) no-repeat;
				background-size: 100% 100%;
			}
			#logo{
				width: 56px;
				margin: 15px 0 0 18px;
			}
			#biaoti{
				display: block;
				width: 90%;
				margin: 0 auto;
			}
			#form{
				overflow: hidden;
				background: url(/game-treasure/img/tijiao.png) no-repeat;
				background-size: 100% 100%;
				height: 35px;
				width: 231px;
				margin: 5px auto 0;
			}
			@media only screen and (min-width:321px ) {
				#form{
					margin: 12% auto 0;
				}
			}
			#form input{
				float: left;
				border: none;
				height: 35px;
				background: rgba(0,0,0,0);
				outline: none;
				-webkit-appearance: none;
			}
			input[type=text]{
				font-size: 12px;
				width: 151px;
				padding-left: 16px;
				padding-right: 10px;
			}
			input[type=submit]{
				font-size: 14px;
				color: #FFF;
				font-weight: bold;
				width: 54px;
			}
			#anniu{
				width: 240px;
				margin: 15px auto 0;
			}
			#anniu a{
				display: inline-block;
				width: 115px;
				height: 40px;
				background: url(/game-treasure/img/anniu.png) no-repeat;
				background-size: 100% 100%;
				font-size: 14px;
				font-weight: bold;
				color: #FFF;
				text-align: center;
				line-height: 28px;
				text-decoration: none;
			}
			#anniu a:first-child{
				margin-right: 10px;
			}
			#baoxiang{
				display: block;
				width: 65%;
				margin: 0 auto;
				position: absolute;
				bottom: 3%;
				left: 50%;
				margin-left: -32.5%;
			}
			.cancel{
				position: absolute;
				top: 16px;
				left: 85%;
				width: 40px;
				height: 40px;
				background: url(/game-treasure/img/cancel.png) no-repeat;
				background-size: 100% 100%;
				display: block;
			}
			.rules{
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				display: none;
			}
			.rule{
				width: 100%;
				height: 100%;
				background: url(/game-treasure/img/rule.png) no-repeat;
				background-size: 100% 100%;
			}
			.yiwan{
				background: url(/game-treasure/img/yiwan.png) no-repeat;
				background-size: 100% 100%;
			}
			.yiwan1{
				background: url(/game-treasure/img/yiwan1.png) no-repeat;
				background-size: 100% 100%;
			}
			.win{
				background: url(/game-treasure/img/winbg.jpg) no-repeat;
				background-size: 100% 100%;
				height: initial;
			}
			.winContent{
				background: url(/game-treasure/img/wincontent.png) no-repeat;
				background-size: 100% 100%;
				width: 80%;
				margin: 16% auto 0;
				position: relative;
				padding-bottom: 8px;
			}
			.winContent p{
				color: #515151;
				font-size: 12px;
				text-align: center;
				width: 171px;
				margin: 0 auto 7px;
				line-height: 18px;
			}
			.winContent p:nth-child(3) span{
				height:22px;
				display: block;
				text-align: center;
				line-height:22px;
			}

			.winContent .nop{
				line-height:12px;
			}
			.winContent p:first-child{
				padding-top: 130px;
			}
			.winContent p:nth-child(3){
				background: url(/game-treasure/img/kuang.png) no-repeat;
				background-size: cover;
				width: 155px;
				height: 44px;
				line-height: 44px;
				color: #df3544;
				font-size: 14px;
				font-weight: bold;
				margin-bottom: 10px;
			}
			.winContent a{
				display: block;
				width: 115px;
				height: 39px;
				line-height: 28px !important;
				background: url(/game-treasure/img/anniu.png) no-repeat;
				background-size: 100% 100%;
				outline: none;
				color: #fff;
				font-size: 15px;
				font-weight: bold;
				text-align: center;
				margin: 18px auto 0;
				position: relative;
				z-index: 5;
			}
			.winContent img{
				position: relative;
				display: block;
				width: 80%;
				margin:-40px auto 0;
				z-index: 0;
			}
			.bao{
				display: block;
				width: 72%;
    			margin: -62px auto 0;
			}
		</style>
	</head>
	<body>
		<div id="index">
			<img id="logo" src="/game-treasure/img/logo.png" alt="" />
			<img id="biaoti" src="/game-treasure/img/biaoti.png" alt="" />
			<form id="form" action="" method="post">
				<input type="text" name="keyword" id="keyword" placeholder="请输入你找到的关键词" />
				<input type="hidden" name="id" id="id" value="#(openid??)" >
				<input type="submit" value="提交"/>
			</form>
			<div id="anniu">
				<a onclick="bao()">开始寻宝</a><a href="#" onclick="rule()">活动规则</a>
			</div>
			<img id="baoxiang" src="/game-treasure/img/baoxiang.png" alt="" />
			<a class="cancel" href="#"></a>
		</div>
		<div class="rules">
			<div class="rule"></div>
			<a class="cancel close" href="#"></a>
		</div>
		<div class="rules">
			<div class="rule yiwan"></div>
			<a class="cancel close" href="#"></a>
		</div>
		<div class="rules">
			<div class="rule yiwan1"></div>
			<a class="cancel close" href="#"></a>
		</div>
		<div class="rules win">
			<div class="winContent">
				<p>这么棒！成功找出本次“文字寻宝”中的关键词 </p>
				<p>恭喜你获得价值<span class="valuep"></span>元的<span class="namep"></span>奖品一份</p>
				<p><span>中奖编码</span><span class="nop"></span></p>
				<p>兑奖方式可在“我的奖品”中查看 请幸运的你，在规定时间到指定地点，领取你的专属奖品！</p>
				<a href="#">我的奖品</a>
				<img src="/game-treasure/img/sahua.png" alt="" />
			</div>
			<img class="bao" src="/game-treasure/img/baoxiang.png" alt="" />
		</div>
		<a class="cancel close" href="/wxcs?shuju=1"></a>
	</body>
	<script type="text/javascript">
		//返回网页
        function bao(){
            $.ajax({
                url:"href",
                type:"post",
                success:function(data){
//                    console.log(data.href);
                    //根据返回页面进行跳转
                    window.location.href=data.href;
                },error:function(data){
					alert("网络异常，请稍后再试。")
                }
			});

        }

		function rule(){
			$(".rules").eq(0).fadeIn();
		}
		$(".close").click(function(){
			$(".rules").fadeOut();
		})
		$("#form").submit(function(){
			$(this).ajaxSubmit({
				url:"ajax",
				type:"post",
				success:function(data){
					//失败
					if(data.success==1){
						$(".rules").eq(1).fadeIn();
					};
					//奖品已领完
					if(data.success==2){
						$(".rules").eq(2).fadeIn();
					};
					//恭喜中奖
					if(data.success==3){
                        $(".valuep").html(data.valuep);
                        $(".namep").html(data.namep);
                        $(".nop").html(data.nop);
						$(".rules").eq(3).fadeIn();
					};

				},
				error:function(){
					
				}
			})
			return false;
		})
		
	</script>
</html>
